package com.hsgene.supplier.domain;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.hsgene.common.util.date.TimeJsonDeserializer;
import com.hsgene.common.util.validation.FieldChecker;

import java.io.Serializable;
import java.util.Date;

/**
 * 供应商-检测机构
 *
 * @author wangbing
 * @version 1.0, 2018/7/12
 */
public class DetectionOrganization implements Serializable {

    private static final long serialVersionUID = 9199145332671168923L;

    /**
     * 供应商id
     */
    private Long id;

    /**
     * 供应商名称
     */
    private String supplierName;

    /**
     * 超级管理员账号
     */
    private String superUserName;

    /**
     * 收件人姓名
     */
    private String consigneeName;

    /**
     * 收件人联系电话
     */
    private String consigneePhone;

    /**
     * 省级id
     */
    private Long provinceId;

    /**
     * 市级id
     */
    private Long cityId;

    /**
     * 区县级id
     */
    private Long countyId;

    /**
     * 收货地址
     */
    private String consignAddress;

    /**
     * 是否有效（标识禁用：true = 有效-不禁用，false = 无效-禁用）
     */
    private Boolean available;

    /**
     * 是否删除
     */
    private Boolean deleted;

    /**
     * 创建时间
     */
    @JsonDeserialize(using = TimeJsonDeserializer.class)
    private Date createTime;

    /**
     * 更新时间
     */
    @JsonDeserialize(using = TimeJsonDeserializer.class)
    private Date updateTime;

    public void check() {
        FieldChecker.checkEmpty(supplierName, "supplierName");
        FieldChecker.checkEmpty(consignAddress, "consignAddress");
        FieldChecker.checkEmpty(consigneeName, "consigneeName");
        FieldChecker.checkEmpty(consigneePhone, "consigneePhone");
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getSupplierName() {
        return supplierName;
    }

    public void setSupplierName(String supplierName) {
        this.supplierName = supplierName;
    }

    public String getSuperUserName() {
        return superUserName;
    }

    public void setSuperUserName(String superUserName) {
        this.superUserName = superUserName;
    }

    public String getConsigneeName() {
        return consigneeName;
    }

    public void setConsigneeName(String consigneeName) {
        this.consigneeName = consigneeName;
    }

    public String getConsigneePhone() {
        return consigneePhone;
    }

    public void setConsigneePhone(String consigneePhone) {
        this.consigneePhone = consigneePhone;
    }

    public Long getProvinceId() {
        return provinceId;
    }

    public void setProvinceId(Long provinceId) {
        this.provinceId = provinceId;
    }

    public Long getCityId() {
        return cityId;
    }

    public void setCityId(Long cityId) {
        this.cityId = cityId;
    }

    public Long getCountyId() {
        return countyId;
    }

    public void setCountyId(Long countyId) {
        this.countyId = countyId;
    }

    public String getConsignAddress() {
        return consignAddress;
    }

    public void setConsignAddress(String consignAddress) {
        this.consignAddress = consignAddress;
    }

    public Boolean getAvailable() {
        return available;
    }

    public void setAvailable(Boolean available) {
        this.available = available;
    }

    public Boolean getDeleted() {
        return deleted;
    }

    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }
}
